package com.br.aicoach;

import com.br.gui.aicoach.TelaCadastroJogadores;
import com.br.gui.aicoach.TelaCadastroTimes;
import com.br.gui.aicoach.TelaListaTimes;
import com.br.gui.aicoach.TelaTatica;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity implements android.view.View.OnClickListener {
	
	Button btnEntrar,btnCadastrarJogador,btnTimes;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		btnEntrar = (Button) findViewById(R.id.btnCadastrarJogador);
		btnEntrar.setOnClickListener(this);
		btnTimes= (Button) findViewById(R.id.btnJogadores);
		btnTimes.setOnClickListener(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public void onClick(View v) {
		if(v.getId() == R.id.btnCadastrarJogador){
			Intent intent = new Intent(MainActivity.this,TelaCadastroTimes.class);
			startActivity(intent);
			
		}if(v.getId() == R.id.btnJogadores){
			Intent intent = new Intent(MainActivity.this,TelaListaTimes.class);
			startActivity(intent);
			
			
		}
		
	}

	

}
